<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>立体相框</title>
    <style>
        html {
            perspective: 800px;
        }
        .cube {
            height: 500px;
            width: 500px;
            /* background-color: #bfa; */
            margin: 200px auto;
            transform-style: preserve-3d;
            /* transform: rotateX(45deg) rotateZ(45deg); */
            animation: run 18s infinite linear;
        }
        .cube > div {
            width: 500px;
            height: 500px;
            opacity: .9;
            position: absolute;
        }
        img {
            vertical-align: top;
        }
        .box1 {
            transform: rotateX(90deg) translateZ(250px);
        }
        .box2 {
            transform: rotateX(-90deg) translateZ(250px);
        }
        .box3 {
            transform: rotateY(90deg) translateZ(250px);
        }
        .box4 {
            transform: rotateY(-90deg) translateZ(250px);
        }
        .box5 {
            transform: translateZ(250px);
        }
        .box6 {
            transform: rotateY(180deg) translateZ(250px);
        }
        @keyframes run {
            from {
                transform: rotateX(0) rotateZ(0);
            }
            to {
                transform: rotateX(360deg) rotateZ(360deg);
            }
        }
    </style>
</head>
<body>
    <!-- 创建外部容器 -->
    <div class="cube">
        <div class="box1">
            <img src="./imgs/1.jpg" alt="">
        </div>
        <div class="box2">
            <img src="./imgs/2.jpg" alt="">
        </div>
        <div class="box3">
            <img src="./imgs/3.jpg" alt="">
        </div>
        <div class="box4">
            <img src="./imgs/4.jpg" alt="">
        </div>
        <div class="box5">
            <img src="./imgs/5.jpg" alt="">
        </div>
        <div class="box6">
            <img src="./imgs/6.jpg" alt="">
        </div>
    </div>
</body>
</html>